﻿<Window x:Class="Dreambuild.Gis.Desktop.Demos.LowCarbon.BuildingParamsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:svc="clr-namespace:Dreambuild.Gis.Desktop.Demos.LowCarbon"
        Height="539.666" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Title="{DynamicResource ArchitectureParameter}">

    <Grid Margin="0,10,0,0" Name="BuildingParamsGrid">
        <TreeView Margin="70,0,82,46">
            <TreeViewItem Header="{DynamicResource CO2EmissionofBuildingMaterials}" IsExpanded="True" >
                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource PublicBuilding}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding PublicBuildingMaterial, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource ResidentialBuilding}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding ResidentialBuildingMaterial, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

            </TreeViewItem>

            <TreeViewItem Header="{DynamicResource CO2EmissionofConstruction}" IsExpanded="True">
                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource SteelStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding SteelStructureContruction, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource ConcreteStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding ConcreteStructureContruction, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource WoodStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding TimberStructureContruction, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

            </TreeViewItem>
            <TreeViewItem Header="{DynamicResource CO2EmissionofUseandOperation}" IsExpanded="True">
                <TreeViewItem IsExpanded="True" Height="180" Margin="0,0,68,0" >
                    <TreeViewItem.Header >
                        <StackPanel Margin="0,0,0,0"  Width="510" Height="180" x:Name="ProductionGrid">
                            <Grid Height="150" Margin="0,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                </Grid.ColumnDefinitions>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="1*" />
                                    <RowDefinition Height="1*" />
                                    <RowDefinition Height="1*" />
                                    <RowDefinition Height="1*" />
                                    <RowDefinition Height="1*" />
                                </Grid.RowDefinitions>

                                <Grid.Resources>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="HorizontalAlignment" Value="Center" />
                                        <Setter Property="VerticalAlignment" Value="Center" />
                                        <Setter Property="TextWrapping" Value="Wrap" />
                                    </Style>
                                    <Style TargetType="TextBox">
                                        <Setter Property="TextAlignment" Value="Right" />
                                        <Setter Property="VerticalContentAlignment" Value="Center" />
                                        <Setter Property="Margin" Value="1" />
                                    </Style>
                                </Grid.Resources>

                                <Grid.Children>
                                    <Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="1" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Multi-Office}" />
                                    </Border>
                                    <Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="1" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Multi-Res}" />
                                    </Border>
                                    <Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="1" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource High-Office}" />
                                    </Border>
                                    <Border Grid.Column="4" Grid.Row="0" Grid.ColumnSpan="1" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource High-Res}" />
                                    </Border>
                                    <Border Grid.Column="5" Grid.Row="0" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Hotel}" />
                                    </Border>
                                    <Border Grid.Column="6" Grid.Row="0" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Commerce}" />
                                    </Border>

                                    <Border Grid.Column="0" Grid.Row="1" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource AirConditioning}" />
                                    </Border>
                                    <Border Grid.Column="0" Grid.Row="2" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Lighting}" />
                                    </Border>
                                    <Border Grid.Column="0" Grid.Row="3" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource Appliance}" />
                                    </Border>
                                    <Border Grid.Column="0" Grid.Row="4" Background="Orange" Margin="1" >
                                        <TextBlock Text="{DynamicResource HeatingandHotWater}" />
                                    </Border>

                                    <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding AirConditioning[0], Mode=TwoWay}" />
                                    <TextBox Grid.Column="2" Grid.Row="1" Text="{Binding AirConditioning[1], Mode=TwoWay}" />
                                    <TextBox Grid.Column="3" Grid.Row="1" Text="{Binding AirConditioning[2], Mode=TwoWay}" />
                                    <TextBox Grid.Column="4" Grid.Row="1" Text="{Binding AirConditioning[3], Mode=TwoWay}" />
                                    <TextBox Grid.Column="5" Grid.Row="1" Text="{Binding AirConditioning[4], Mode=TwoWay}" />
                                    <TextBox Grid.Column="6" Grid.Row="1" Text="{Binding AirConditioning[5], Mode=TwoWay}" />

                                    <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Lighting[0], Mode=TwoWay}" />
                                    <TextBox Grid.Column="2" Grid.Row="2" Text="{Binding Lighting[1], Mode=TwoWay}" />
                                    <TextBox Grid.Column="3" Grid.Row="2" Text="{Binding Lighting[2], Mode=TwoWay}" />
                                    <TextBox Grid.Column="4" Grid.Row="2" Text="{Binding Lighting[3], Mode=TwoWay}" />
                                    <TextBox Grid.Column="5" Grid.Row="2" Text="{Binding Lighting[4], Mode=TwoWay}" />
                                    <TextBox Grid.Column="6" Grid.Row="2" Text="{Binding Lighting[5], Mode=TwoWay}" />

                                    <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Equipment[0], Mode=TwoWay}" />
                                    <TextBox Grid.Column="2" Grid.Row="3" Text="{Binding Equipment[1], Mode=TwoWay}" />
                                    <TextBox Grid.Column="3" Grid.Row="3" Text="{Binding Equipment[2], Mode=TwoWay}" />
                                    <TextBox Grid.Column="4" Grid.Row="3" Text="{Binding Equipment[3], Mode=TwoWay}" />
                                    <TextBox Grid.Column="5" Grid.Row="3" Text="{Binding Equipment[4], Mode=TwoWay}" />
                                    <TextBox Grid.Column="6" Grid.Row="3" Text="{Binding Equipment[5], Mode=TwoWay}" />

                                    <TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Heating[0], Mode=TwoWay}" />
                                    <TextBox Grid.Column="2" Grid.Row="4" Text="{Binding Heating[1], Mode=TwoWay}" />
                                    <TextBox Grid.Column="3" Grid.Row="4" Text="{Binding Heating[2], Mode=TwoWay}" />
                                    <TextBox Grid.Column="4" Grid.Row="4" Text="{Binding Heating[3], Mode=TwoWay}" />
                                    <TextBox Grid.Column="5" Grid.Row="4" Text="{Binding Heating[4], Mode=TwoWay}" />
                                    <TextBox Grid.Column="6" Grid.Row="4" Text="{Binding Heating[5], Mode=TwoWay}" />

                                </Grid.Children>
                            </Grid>

                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                <Label Content="{Binding BaseYear}" HorizontalAlignment="Left" />
                                <Label Content="{Binding CityName}" HorizontalAlignment="Right" />
                            </StackPanel>
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

            </TreeViewItem>
            <TreeViewItem Header="{DynamicResource CO2MitigationofDemolitionandRecycle}" IsExpanded="True">
                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource SteelStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding SteelStructureRecycle, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource ConcreteStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding ConcreteStructureRecycle, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

                <TreeViewItem>
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Label Content="{DynamicResource WoodStructure}" Width="120" HorizontalAlignment="Left" />
                            <TextBox Width="70" Text="{Binding TimberStructureRecycle, Mode=TwoWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Right" />
                            <Label Content="kg/㎡" HorizontalAlignment="Right" />
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>

            </TreeViewItem>
        </TreeView>

        <Button Content="{DynamicResource Confirm}" HorizontalAlignment="Left" Margin="526,472,0,0" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.744,0.767" Click="OK_Button_Click"/>
        <Button Content="{DynamicResource Cancel}" HorizontalAlignment="Left" Margin="637,472,0,0" VerticalAlignment="Top" Width="75" Click="Cancel_Button_Click"/>


    </Grid>
</Window>
